<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用JavaScript改变HTML元素</title>
</head>

<body>
    <h1>我的第一个 Web 页面</h1>
    <p id="demo">我的第一个段落。</p>
    <script>
        document.getElementById("demo").innerHTML = "段落已修改。";
    </script>
</body>

</html>